﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VAPFOLGE
    {
        public void SetUpNewRow(ref DataRow dwReturn)
        {
            #region
            #endregion
            switch (app.company)
            {
                case "YGR":
                case "SXN":
                case "TST":
                case "UBT":
                default:
                    #region
                    dwReturn["APFMANDANT"] = "00";
                    dwReturn["APFWERK"] = "   ";
                    dwReturn["APFANRKRS"] = "HM";
                    dwReturn["APFALFDNR"] = "000002";
                    dwReturn["APFAFOLGE"] = "080";
                    dwReturn["APFAGANG"] = "JS             ";
                    dwReturn["APFBZAGANG"] = "¾«Êá                                                        ";
                    dwReturn["APFKSTKRS"] = "  ";
                    dwReturn["APFKST"] = "0300";
                    dwReturn["APFSTDMASCH"] = "00";
                    dwReturn["APFMTYP"] = "JS      ";
                    dwReturn["APFPARALKZ"] = "N";
                    dwReturn["APFBLOCKKZ1"] = " ";
                    dwReturn["APFBLOCKKZ2"] = "0";
                    dwReturn["APFSTATKZ"] = "B";
                    dwReturn["APFPROZMG"] = "0";
                    dwReturn["APFKALKKZ"] = "J";
                    dwReturn["APFDISPOST"] = " ";
                    dwReturn["APFARTKZ"] = "N";
                    dwReturn["APFARTAUSN"] = "N";
                    dwReturn["APFZUSKZ"] = "  ";
                    dwReturn["APFZUSAUSN"] = "N";
                    dwReturn["APFRUECKKZ"] = "N";
                    dwReturn["APFKENNUNG"] = "  ";
                    dwReturn["APFLAGPLKZ"] = "N";
                    dwReturn["APFMATABR"] = " ";
                    dwReturn["APFSONDERKZ"] = " ";
                    dwReturn["APFZUSATZ1"] = " ";
                    dwReturn["APFZUSATZ2"] = " ";
                    dwReturn["APFZUSATZ3"] = " ";
                    dwReturn["APFZUSATZ4"] = " ";
                    dwReturn["APFZUSATZ5"] = " ";
                    dwReturn["APFZUSTAND"] = "    ";
                    dwReturn["APFDOMPART"] = "N";
                    dwReturn["APFFERTIG"] = "N";
                    dwReturn["APFPRUEFANW"] = "N";
                    dwReturn["APFPROBE"] = "N";
                    dwReturn["APFPAPIERKZ"] = "J";
                    dwReturn["APFEINSTKA"] = "N";
                    dwReturn["APFLAEAEND"] = "0";
                    dwReturn["APFLAEAENDO"] = "00";
                    dwReturn["APFGEWAEND"] = "0";
                    dwReturn["APFMLMG"] = "0";
                    dwReturn["APFBASMGE"] = "5000";
                    dwReturn["APFME"] = "1";
                    dwReturn["APFZE"] = "MI";
                    dwReturn["APFZEITB"] = "100";
                    dwReturn["APFPERSANZ"] = "1";
                    dwReturn["APFQUALI"] = "      ";
                    dwReturn["APFLGRP"] = "      ";
                    dwReturn["APFLART"] = "      ";
                    dwReturn["APFLSCHEINE"] = "0";
                    dwReturn["APFLZDR"] = " ";
                    dwReturn["APFVBKZ"] = " ";
                    dwReturn["APFZEITBT1"] = "0";
                    dwReturn["APFZEITBT2"] = "0";
                    dwReturn["APFZEITBT3"] = "0";
                    dwReturn["APFZEITBT4"] = "0";
                    dwReturn["APFZEITBT5"] = "0";
                    dwReturn["APFZEITBT6"] = "0";
                    dwReturn["APFZEITBT7"] = "0";
                    dwReturn["APFZEITBT8"] = "0";
                    dwReturn["APFZEITBT9"] = "0";
                    dwReturn["APFZEITBT10"] = "0";
                    dwReturn["APFZEITBT11"] = "0";
                    dwReturn["APFZEITBT12"] = "0";
                    dwReturn["APFZEITBT13"] = "0";
                    dwReturn["APFZEITBT14"] = "0";
                    dwReturn["APFZEITBT15"] = "0";
                    dwReturn["APFZEITBT16"] = "0";
                    dwReturn["APFZEITBT17"] = "0";
                    dwReturn["APFZEITBT18"] = "0";
                    dwReturn["APFZEITBT19"] = "0";
                    dwReturn["APFZEITBT20"] = "0";
                    dwReturn["APFZEITBT21"] = "0";
                    dwReturn["APFZEITBT22"] = "0";
                    dwReturn["APFZEITBT23"] = "0";
                    dwReturn["APFZEITBT24"] = "0";
                    dwReturn["APFZEITBT25"] = "0";
                    dwReturn["APFZEITBT26"] = "0";
                    dwReturn["APFZEITBT27"] = "0";
                    dwReturn["APFZEITBT28"] = "0";
                    dwReturn["APFZEITBT29"] = "0";
                    dwReturn["APFZEITBT30"] = "0";
                    dwReturn["APFZEITBT31"] = "0";
                    dwReturn["APFZEITBT32"] = "0";
                    dwReturn["APFZEITBT33"] = "0";
                    dwReturn["APFZEITBT34"] = "0";
                    dwReturn["APFZEITBT35"] = "0";
                    dwReturn["APFZEITBT36"] = "0";
                    dwReturn["APFZEITBT37"] = "0";
                    dwReturn["APFZEITBT38"] = "0";
                    dwReturn["APFZEITBT39"] = "0";
                    dwReturn["APFZEITBT40"] = "0";
                    dwReturn["APFZEITBT41"] = "0";
                    dwReturn["APFZEITBT42"] = "0";
                    dwReturn["APFZEITBT43"] = "0";
                    dwReturn["APFZEITBT44"] = "0";
                    dwReturn["APFZEITBT45"] = "0";
                    dwReturn["APFZEITBT46"] = "0";
                    dwReturn["APFZEITBT47"] = "0";
                    dwReturn["APFZEITBT48"] = "0";
                    dwReturn["APFAEVOR"] = "0001";
                    dwReturn["APFBNRKRS"] = "  ";
                    dwReturn["APFBLFDNR"] = "000000";
                    dwReturn["APFBAFOLGE"] = "000";
                    dwReturn["APFKAFOLGE1"] = "000";
                    dwReturn["APFKART1"] = "  ";
                    dwReturn["APFKZMIN1"] = "0";
                    dwReturn["APFKZMAX1"] = "0";
                    dwReturn["APFKMINWMGE1"] = "0";
                    dwReturn["APFKABST1"] = "0";
                    dwReturn["APFKZE1"] = "  ";
                    dwReturn["APFKAFOLGE2"] = "000";
                    dwReturn["APFKART2"] = "  ";
                    dwReturn["APFKZMIN2"] = "0";
                    dwReturn["APFKZMAX2"] = "0";
                    dwReturn["APFKMINWMGE2"] = "0";
                    dwReturn["APFKABST2"] = "0";
                    dwReturn["APFKZE2"] = "  ";
                    dwReturn["APFKAFOLGE3"] = "000";
                    dwReturn["APFKART3"] = "  ";
                    dwReturn["APFKZMIN3"] = "0";
                    dwReturn["APFKZMAX3"] = "0";
                    dwReturn["APFKMINWMGE3"] = "0";
                    dwReturn["APFKABST3"] = "0";
                    dwReturn["APFKZE3"] = "  ";
                    dwReturn["APFKAFOLGE4"] = "000";
                    dwReturn["APFKART4"] = "  ";
                    dwReturn["APFKZMIN4"] = "0";
                    dwReturn["APFKZMAX4"] = "0";
                    dwReturn["APFKMINWMGE4"] = "0";
                    dwReturn["APFKABST4"] = "0";
                    dwReturn["APFKZE4"] = "  ";
                    dwReturn["APFKAFOLGE5"] = "000";
                    dwReturn["APFKART5"] = "  ";
                    dwReturn["APFKZMIN5"] = "0";
                    dwReturn["APFKZMAX5"] = "0";
                    dwReturn["APFKMINWMGE5"] = "0";
                    dwReturn["APFKABST5"] = "0";
                    dwReturn["APFKZE5"] = "  ";
                    dwReturn["APFVZUSA"] = " ";
                    dwReturn["APFVFDVF1"] = "   ";
                    dwReturn["APFVFDVF2"] = "   ";
                    dwReturn["APFVFDVF3"] = "   ";
                    dwReturn["APFVFDVF4"] = "   ";
                    dwReturn["APFVFDVF5"] = "   ";
                    dwReturn["APFNEGVERF"] = " ";
                    dwReturn["APFRZUSA"] = " ";
                    dwReturn["APFRUESTGRP1"] = "   ";
                    dwReturn["APFRUESTGRP2"] = "   ";
                    dwReturn["APFRUESTGRP3"] = "   ";
                    dwReturn["APFRUESTGRP4"] = "   ";
                    dwReturn["APFRUESTGRP5"] = "   ";
                    dwReturn["APFNEGRGRP"] = " ";
                    dwReturn["APFPZUSA"] = " ";
                    dwReturn["APFPRUEFGRP1"] = " ";
                    dwReturn["APFPRUEFGRP2"] = " ";
                    dwReturn["APFPRUEFGRP3"] = " ";
                    dwReturn["APFPRUEFGRP4"] = " ";
                    dwReturn["APFPRUEFGRP5"] = " ";
                    dwReturn["APFNEGPGRP"] = " ";
                    dwReturn["APFQCCHECK"] = " ";
                    dwReturn["APFOQUATF"] = "0";
                    dwReturn["APFOQUATUT"] = "0";
                    dwReturn["APFOQUNIT"] = " ";
                    dwReturn["APFTLVF1"] = "   ";
                    dwReturn["APFTLVF2"] = "   ";
                    dwReturn["APFTLVF3"] = "   ";
                    dwReturn["APFTLVF4"] = "   ";
                    dwReturn["APFTLVF5"] = "   ";
                    dwReturn["APFNEGTLVF"] = " ";
                    dwReturn["APFIAUFMSL1"] = "  ";
                    dwReturn["APFIAUFMSL2"] = "  ";
                    dwReturn["APFIAUFMSL3"] = "  ";
                    dwReturn["APFIAUFMSL4"] = "  ";
                    dwReturn["APFIAUFMSL5"] = "  ";
                    dwReturn["APFIAUFMSL6"] = "  ";
                    dwReturn["APFNEGAUFM"] = " ";
                    dwReturn["APFOAUFMSL1"] = "  ";
                    dwReturn["APFOAUFMSL2"] = "  ";
                    dwReturn["APFOAUFMSL3"] = "  ";
                    dwReturn["APFOAUFMSL4"] = "  ";
                    dwReturn["APFOAUFMSL5"] = "  ";
                    dwReturn["APFOAUFMSL6"] = "  ";
                    dwReturn["APFONEGAUFM"] = " ";
                    dwReturn["APFZAM1"] = "  ";
                    dwReturn["APFZAM2"] = "  ";
                    dwReturn["APFZAM3"] = "  ";
                    dwReturn["APFZAM4"] = "  ";
                    dwReturn["APFZAM5"] = "  ";
                    dwReturn["APFNEGZAM"] = " ";
                    dwReturn["APFVERP1"] = "    ";
                    dwReturn["APFVERP2"] = "    ";
                    dwReturn["APFVERP3"] = "    ";
                    dwReturn["APFVERP4"] = "    ";
                    dwReturn["APFVERP5"] = "    ";
                    dwReturn["APFNEGVERP"] = " ";
                    dwReturn["APFSUBSTGR1"] = "   ";
                    dwReturn["APFSUBSTGR2"] = "   ";
                    dwReturn["APFSUBSTGR3"] = "   ";
                    dwReturn["APFSUBSTGR4"] = "   ";
                    dwReturn["APFSUBSTGR5"] = "   ";
                    dwReturn["APFNEGSUBST"] = " ";
                    dwReturn["APFWAART1"] = "   ";
                    dwReturn["APFWAART2"] = "   ";
                    dwReturn["APFWAART3"] = "   ";
                    dwReturn["APFWAART4"] = "   ";
                    dwReturn["APFWAART5"] = "   ";
                    dwReturn["APFNEGWAART"] = " ";
                    dwReturn["APFBHDLG1"] = "   ";
                    dwReturn["APFBHDLG2"] = "   ";
                    dwReturn["APFBHDLG3"] = "   ";
                    dwReturn["APFBHDLG4"] = "   ";
                    dwReturn["APFBHDLG5"] = "   ";
                    dwReturn["APFBHDLG6"] = "   ";
                    dwReturn["APFNEGBHDLG"] = " ";
                    dwReturn["APFBHDLG21"] = "   ";
                    dwReturn["APFBHDLG22"] = "   ";
                    dwReturn["APFBHDLG23"] = "   ";
                    dwReturn["APFBHDLG24"] = "   ";
                    dwReturn["APFBHDLG25"] = "   ";
                    dwReturn["APFBHDLG26"] = "   ";
                    dwReturn["APFNEGBHDLG2"] = " ";
                    dwReturn["APFBHDLG31"] = "   ";
                    dwReturn["APFBHDLG32"] = "   ";
                    dwReturn["APFBHDLG33"] = "   ";
                    dwReturn["APFBHDLG34"] = "   ";
                    dwReturn["APFBHDLG35"] = "   ";
                    dwReturn["APFBHDLG36"] = "   ";
                    dwReturn["APFNEGBHDLG3"] = " ";
                    dwReturn["APFBHDLG41"] = "   ";
                    dwReturn["APFBHDLG42"] = "   ";
                    dwReturn["APFBHDLG43"] = "   ";
                    dwReturn["APFBHDLG44"] = "   ";
                    dwReturn["APFBHDLG45"] = "   ";
                    dwReturn["APFBHDLG46"] = "   ";
                    dwReturn["APFNEGBHDLG4"] = " ";
                    dwReturn["APFFBKL1"] = "   ";
                    dwReturn["APFFBKL2"] = "   ";
                    dwReturn["APFFBKL3"] = "   ";
                    dwReturn["APFFBKL4"] = "   ";
                    dwReturn["APFFBKL5"] = "   ";
                    dwReturn["APFFBKL6"] = "   ";
                    dwReturn["APFNEGFBKL"] = " ";
                    dwReturn["APFMERK11"] = "   ";
                    dwReturn["APFMERK12"] = "   ";
                    dwReturn["APFMERK13"] = "   ";
                    dwReturn["APFMERK14"] = "   ";
                    dwReturn["APFMERK15"] = "   ";
                    dwReturn["APFMERK16"] = "   ";
                    dwReturn["APFNEGMERK1"] = " ";
                    dwReturn["APFHANDICAP1"] = "   ";
                    dwReturn["APFHANDICAP2"] = "   ";
                    dwReturn["APFHANDICAP3"] = "   ";
                    dwReturn["APFHANDICAP4"] = "   ";
                    dwReturn["APFHANDICAP5"] = "   ";
                    dwReturn["APFHANDICAP6"] = "   ";
                    dwReturn["APFNEGHANDICAP"] = " ";
                    dwReturn["APFGEWSCHL"] = "  ";
                    dwReturn["APFGEW1"] = "0";
                    dwReturn["APFGEW2"] = "0";
                    dwReturn["APFNEGGEW"] = " ";
                    dwReturn["APFBRTSCHL"] = " ";
                    dwReturn["APFBRT1"] = "0";
                    dwReturn["APFBRT2"] = "0";
                    dwReturn["APFNEGBRT"] = " ";
                    dwReturn["APFWERT2SCHL"] = "  ";
                    dwReturn["APFWERT21"] = "0";
                    dwReturn["APFWERT22"] = "0";
                    dwReturn["APFNEGWERT2"] = " ";
                    dwReturn["APFMERK2"] = "  ";
                    dwReturn["APFMERKSCHL"] = "               ";
                    dwReturn["APFNEGMERK2"] = " ";
                    dwReturn["APFANFART1"] = "    ";
                    dwReturn["APFANFWERT11"] = "                    ";
                    dwReturn["APFANFWERT12"] = "                    ";
                    dwReturn["APFANFART2"] = "    ";
                    dwReturn["APFANFWERT21"] = "                    ";
                    dwReturn["APFANFWERT22"] = "                    ";
                    dwReturn["APFUEBZT"] = "0";
                    dwReturn["APFAUSFA"] = " ";
                    dwReturn["APFAUSFB"] = " ";
                    dwReturn["APFAMETHODE"] = "        ";
                    dwReturn["APFAAFOLGE"] = "000";
                    dwReturn["APFVNAME"] = "     ";
                    dwReturn["APFFLAG"] = "0";
                    dwReturn["APFTRKOST"] = "0";
                    dwReturn["APFSOKOST"] = "0";
                    dwReturn["APFSOME"] = " ";
                    dwReturn["APFZLKOST"] = "    ";
                    dwReturn["APFURLAND"] = "   ";
                    dwReturn["APFAENDZL"] = "1";
                    dwReturn["APFAENDBEN"] = "JAKV    ";
                    dwReturn["APFAENDDAT"] = "20140920";
                    dwReturn["APFNEUBEN"] = "JAKV    ";
                    dwReturn["APFNEUDAT"] = "20140920";
                    dwReturn["APFFILLER"] = "N                                                                                                     ";
                    #endregion
                    break;
            }
        }
        public void InsertAPFOLGE(DataRow dwData, string ITXDBVERSION = "50.24")
        {

            or1 = OracleDB.CreateCommand();
            switch (app.company)
            {
                case "YGR":
                case "SXN":
                case "TST":
                case "UBT":
                default:
                    or1.CommandText = "INSERT INTO APFOLGE "
                   + " SELECT :APFMANDANT:,:APFWERK:,:APFANRKRS:,:APFALFDNR:,:APFAFOLGE:,:APFAGANG:,:APFBZAGANG:,:APFKSTKRS:,:APFKST:,:APFSTDMASCH:,:APFMTYP:,:APFPARALKZ:,:APFBLOCKKZ1:,:APFBLOCKKZ2:,:APFSTATKZ:,:APFPROZMG:,:APFKALKKZ:,:APFDISPOST:,:APFARTKZ:,:APFARTAUSN:,:APFZUSKZ:,:APFZUSAUSN:,:APFRUECKKZ:,:APFKENNUNG:,:APFLAGPLKZ:,:APFMATABR:,:APFSONDERKZ:,:APFZUSATZ1:,:APFZUSATZ2:,:APFZUSATZ3:,:APFZUSATZ4:,:APFZUSATZ5:,:APFZUSTAND:,:APFDOMPART:,:APFFERTIG:,:APFPRUEFANW:,:APFPROBE:,:APFPAPIERKZ:,:APFEINSTKA:,:APFLAEAEND:,:APFLAEAENDO:,:APFGEWAEND:,:APFMLMG:,:APFBASMGE:,:APFME:,:APFZE:,:APFZEITB:,:APFPERSANZ:,:APFQUALI:,:APFLGRP:,:APFLART:,:APFLSCHEINE:,:APFLZDR:,:APFVBKZ:,:APFZEITBT1:,:APFZEITBT2:,:APFZEITBT3:,:APFZEITBT4:,:APFZEITBT5:,:APFZEITBT6:,:APFZEITBT7:,:APFZEITBT8:,:APFZEITBT9:,:APFZEITBT10:,:APFZEITBT11:,:APFZEITBT12:,:APFZEITBT13:,:APFZEITBT14:,:APFZEITBT15:,:APFZEITBT16:,:APFZEITBT17:,:APFZEITBT18:,:APFZEITBT19:,:APFZEITBT20:,:APFZEITBT21:,:APFZEITBT22:,:APFZEITBT23:,:APFZEITBT24:,:APFZEITBT25:,:APFZEITBT26:,:APFZEITBT27:,:APFZEITBT28:,:APFZEITBT29:,:APFZEITBT30:,:APFZEITBT31:,:APFZEITBT32:,:APFZEITBT33:,:APFZEITBT34:,:APFZEITBT35:,:APFZEITBT36:,:APFZEITBT37:,:APFZEITBT38:,:APFZEITBT39:,:APFZEITBT40:,:APFZEITBT41:,:APFZEITBT42:,:APFZEITBT43:,:APFZEITBT44:,:APFZEITBT45:,:APFZEITBT46:,:APFZEITBT47:,:APFZEITBT48:,:APFAEVOR:,:APFBNRKRS:,:APFBLFDNR:,:APFBAFOLGE:,:APFKAFOLGE1:,:APFKART1:,:APFKZMIN1:,:APFKZMAX1:,:APFKMINWMGE1:,:APFKABST1:,:APFKZE1:,:APFKAFOLGE2:,:APFKART2:,:APFKZMIN2:,:APFKZMAX2:,:APFKMINWMGE2:,:APFKABST2:,:APFKZE2:,:APFKAFOLGE3:,:APFKART3:,:APFKZMIN3:,:APFKZMAX3:,:APFKMINWMGE3:,:APFKABST3:,:APFKZE3:,:APFKAFOLGE4:,:APFKART4:,:APFKZMIN4:,:APFKZMAX4:,:APFKMINWMGE4:,:APFKABST4:,:APFKZE4:,:APFKAFOLGE5:,:APFKART5:,:APFKZMIN5:,:APFKZMAX5:,:APFKMINWMGE5:,:APFKABST5:,:APFKZE5:,:APFVZUSA:,:APFVFDVF1:,:APFVFDVF2:,:APFVFDVF3:,:APFVFDVF4:,:APFVFDVF5:,:APFNEGVERF:,:APFRZUSA:,:APFRUESTGRP1:,:APFRUESTGRP2:,:APFRUESTGRP3:,:APFRUESTGRP4:,:APFRUESTGRP5:,:APFNEGRGRP:,:APFPZUSA:,:APFPRUEFGRP1:,:APFPRUEFGRP2:,:APFPRUEFGRP3:,:APFPRUEFGRP4:,:APFPRUEFGRP5:,:APFNEGPGRP:,:APFQCCHECK:,:APFOQUATF:,:APFOQUATUT:,:APFOQUNIT:,:APFTLVF1:,:APFTLVF2:,:APFTLVF3:,:APFTLVF4:,:APFTLVF5:,:APFNEGTLVF:,:APFIAUFMSL1:,:APFIAUFMSL2:,:APFIAUFMSL3:,:APFIAUFMSL4:,:APFIAUFMSL5:,:APFIAUFMSL6:,:APFNEGAUFM:,:APFOAUFMSL1:,:APFOAUFMSL2:,:APFOAUFMSL3:,:APFOAUFMSL4:,:APFOAUFMSL5:,:APFOAUFMSL6:,:APFONEGAUFM:,:APFZAM1:,:APFZAM2:,:APFZAM3:,:APFZAM4:,:APFZAM5:,:APFNEGZAM:,:APFVERP1:,:APFVERP2:,:APFVERP3:,:APFVERP4:,:APFVERP5:,:APFNEGVERP:,:APFSUBSTGR1:,:APFSUBSTGR2:,:APFSUBSTGR3:,:APFSUBSTGR4:,:APFSUBSTGR5:,:APFNEGSUBST:,:APFWAART1:,:APFWAART2:,:APFWAART3:,:APFWAART4:,:APFWAART5:,:APFNEGWAART:,:APFBHDLG1:,:APFBHDLG2:,:APFBHDLG3:,:APFBHDLG4:,:APFBHDLG5:,:APFBHDLG6:,:APFNEGBHDLG:,:APFBHDLG21:,:APFBHDLG22:,:APFBHDLG23:,:APFBHDLG24:,:APFBHDLG25:,:APFBHDLG26:,:APFNEGBHDLG2:,:APFBHDLG31:,:APFBHDLG32:,:APFBHDLG33:,:APFBHDLG34:,:APFBHDLG35:,:APFBHDLG36:,:APFNEGBHDLG3:,:APFBHDLG41:,:APFBHDLG42:,:APFBHDLG43:,:APFBHDLG44:,:APFBHDLG45:,:APFBHDLG46:,:APFNEGBHDLG4:,:APFFBKL1:,:APFFBKL2:,:APFFBKL3:,:APFFBKL4:,:APFFBKL5:,:APFFBKL6:,:APFNEGFBKL:,:APFMERK11:,:APFMERK12:,:APFMERK13:,:APFMERK14:,:APFMERK15:,:APFMERK16:,:APFNEGMERK1:,:APFHANDICAP1:,:APFHANDICAP2:,:APFHANDICAP3:,:APFHANDICAP4:,:APFHANDICAP5:,:APFHANDICAP6:,:APFNEGHANDICAP:,:APFGEWSCHL:,:APFGEW1:,:APFGEW2:,:APFNEGGEW:,:APFBRTSCHL:,:APFBRT1:,:APFBRT2:,:APFNEGBRT:,:APFWERT2SCHL:,:APFWERT21:,:APFWERT22:,:APFNEGWERT2:,:APFMERK2:,:APFMERKSCHL:,:APFNEGMERK2:,:APFANFART1:,:APFANFWERT11:,:APFANFWERT12:,:APFANFART2:,:APFANFWERT21:,:APFANFWERT22:,:APFUEBZT:,:APFAUSFA:,:APFAUSFB:,:APFAMETHODE:,:APFAAFOLGE:,:APFVNAME:,:APFFLAG:,:APFTRKOST:,:APFSOKOST:,:APFSOME:,:APFZLKOST:,:APFURLAND:,:APFAENDZL:,:APFAENDBEN:,:APFAENDDAT:,:APFNEUBEN:,:APFNEUDAT:,:APFFILLER: FROM DUAL"
                   + " WHERE NOT EXISTS (SELECT 1 FROM APFOLGE WHERE  APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR: AND APFAFOLGE=:APFAFOLGE:)";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;
            }

            Connect2Proxy(or1);
        }
        public DataSet QueryAPFOLGE(string client, string krs, string lfd)
        {

            or1 = OracleDB.CreateCommand();

            or1.CommandText = "SELECT P.*,KSZLIEFNR,KSZLO,KSZLB FROM APFOLGE P LEFT JOIN KSTAGZUO k "
                + " ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
            + "  WHERE APFMANDANT=:APFMANDANT AND APFANRKRS=:APFANRKRS AND APFALFDNR=:APFALFDNR";
            or1.Parameters.Add("APFMANDANT", OracleType.NVarChar).Value = client;
            or1.Parameters.Add("APFANRKRS", OracleType.NVarChar).Value = krs;
            or1.Parameters.Add("APFALFDNR", OracleType.NVarChar).Value = lfd;
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;

            return SResult;
        }
        public DataSet QueryAPFOLGE(DataRow dwData, int option = 1)
        {

            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0: SResult = QAPF00(dwData); break;
                case 1: SResult = QAPF01(dwData); break;
                case 2: SResult = QAPF02(dwData); break;
                case 3: SResult = QAPF03(dwData); break;
                case 4: SResult = QAPF04(dwData); break;
                case 5: SResult = QAPF05(dwData); break;
                case 6: SResult = QAPF06(dwData); break;
                case 7: SResult = QAPF07(dwData); break;
                case 8: SResult = QAPF08(dwData); break;
            }
            return SResult;
        }
        public DataSet QAPF00(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM APFOLGE WHERE  ROWNUM<2 ";
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT APFAFOLGE AS KEY,APFAGANG AS DES, P.* FROM APFOLGE P "
                           + "  WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR:"
                           + " ORDER BY P.APFMANDANT,P.APFANRKRS,P.APFALFDNR,P.APFAFOLGE";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT APFMANDANT,APFANRKRS,APFALFDNR,APFAFOLGE,APFAGANG,APFKSTKRS,APFKST,APFMTYP ,KSZLIEFNR,KSZLO,KSZLB FROM APFOLGE P LEFT JOIN KSTAGZUO k "
                   + " ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
                   + "  WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR:"
                   + " ORDER BY P.APFMANDANT,P.APFANRKRS,P.APFALFDNR,P.APFAFOLGE";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF03(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT APFMANDANT,APFANRKRS,APFALFDNR,APFAFOLGE,APFAGANG,APFKSTKRS,APFKST,APFMTYP ,KSZLIEFNR,KSZLO,KSZLB,KSZLP FROM APFOLGE P LEFT JOIN KSTAGZUO k "
                   + " ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
                   + "  WHERE APFMANDANT=:APFMANDANT: "
                   + " ORDER BY P.APFMANDANT,P.APFANRKRS,P.APFALFDNR,P.APFAFOLGE";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF04(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT APFMANDANT,APFANRKRS,APFALFDNR,APFAFOLGE,APFAGANG,APFKSTKRS,APFKST,APFMTYP, APFPARALKZ,APFBASMGE,APFME,APFRUECKKZ,APFKENNUNG,APFZUSATZ1,APFZUSATZ2,APFZUSATZ3,APFZUSATZ4,APFZUSATZ5,"
                  + "APFZUSTAND,APFFERTIG,APFMATABR,APFDOMPART,APFPRUEFANW,APFPROBE,APFANRKRS,APFALFDNR,APFAFOLGE,APFAEVOR,APFEINSTKA ,KSZLIEFNR,KSZLO,KSZLB,KSZLP,KSZMANUELKZ,KSZLAGPLKZ,KSZAUFBKZ,AMNRKRS,AMLFDNR,AMPOS FROM APFOLGE P"
                  + " LEFT JOIN KSTAGZUO k ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
                  + " LEFT JOIN AMSTAMM M ON P.APFKSTKRS=AMKSTKRS AND APFKST=AMKST AND  APFMTYP=AMTYP AND AMSTDVAR='J' "
                  + " WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR:"
                  + " ORDER BY P.APFMANDANT,P.APFANRKRS,P.APFALFDNR,P.APFAFOLGE";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF05(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT P.*,M.AMNRKRS,AMLFDNR,AMPOS"
                   + ",KSZLIEFNR,KSZLO,KSZLB,KSZLP,KSZMANUELKZ FROM APFOLGE P JOIN KSTAGZUO K ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
                   + " JOIN AMSTAMM M ON   APFKSTKRS=AMKSTKRS AND APFKST=AMKST AND APFMTYP=AMTYP AND AMSTDVAR='J'"
                   + "  WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR:"
                   + " ORDER BY P.APFMANDANT,P.APFANRKRS,P.APFALFDNR,P.APFAFOLGE";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF06(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT APFMANDANT,APFANRKRS,APFALFDNR,APFAFOLGE,APFAGANG,APFKSTKRS,APFKST,APFMTYP,"
                    + "APFPARALKZ,APFBASMGE,APFME,APFRUECKKZ,APFKENNUNG,APFZUSATZ1,APFZUSATZ2,APFZUSATZ3,APFZUSATZ4,APFZUSATZ5,"
                    + "APFZUSTAND,APFFERTIG,APFMATABR,APFDOMPART,APFPRUEFANW,APFPROBE,APFANRKRS,APFALFDNR,APFAFOLGE,APFAEVOR,APFEINSTKA"
                    + ",KSZLIEFNR,KSZLO,KSZLB,KSZLP,KSZMANUELKZ,KSZLAGPLKZ,KSZAUFBKZ,AMNRKRS,AMLFDNR,AMPOS FROM APFOLGE P"
                    + " LEFT JOIN KSTAGZUO k ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
                    + " LEFT JOIN AMSTAMM M ON P.APFKSTKRS=AMKSTKRS AND APFKST=AMKST AND  APFMTYP=AMTYP AND AMSTDVAR='J' "
                    + " ORDER BY P.APFMANDANT,P.APFANRKRS,P.APFALFDNR,P.APFAFOLGE";
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF08(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT APFANRKRS,APFALFDNR,KSZLO,KSZLB,KSZLP FROM APFOLGE P JOIN KSTAGZUO k "
                 + " ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
                 + "  WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR:"; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF07(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT APFMANDANT,APFANRKRS,APFALFDNR,APFAFOLGE,APFAGANG,APFKSTKRS,APFKST,APFMTYP,"
                      + "APFPARALKZ,APFBASMGE,APFME,APFRUECKKZ,APFKENNUNG,APFZUSATZ1,APFZUSATZ2,APFZUSATZ3,APFZUSATZ4,APFZUSATZ5,"
                      + "APFZUSTAND,APFFERTIG,APFMATABR,APFDOMPART,APFPRUEFANW,APFPROBE,APFANRKRS,APFALFDNR,APFAFOLGE,APFAEVOR,APFEINSTKA"
                      + ",KSZLIEFNR,KSZLO,KSZLB,KSZLP,KSZMANUELKZ,KSZLAGPLKZ,KSZAUFBKZ,AMNRKRS,AMLFDNR,AMPOS FROM APFOLGE P"
                      + " LEFT JOIN KSTAGZUO k ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
                      + " LEFT JOIN AMSTAMM M ON P.APFKSTKRS=AMKSTKRS AND APFKST=AMKST AND  APFMTYP=AMTYP AND AMSTDVAR='J' "
                       + "  WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF09(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT APFAFOLGE AS KEY,APFAGANG AS DES, P.* FROM APFOLGE P "
                           + "  WHERE APFMANDANT=:APFMANDANT:"
                           +dwData["APFANRKRS"].ToString()
                           + dwData["APFALFDNR"].ToString()
                           + dwData["APFAFOLGE"].ToString()
                          + " ORDER BY P.APFMANDANT,P.APFANRKRS,P.APFALFDNR,P.APFAFOLGE";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF10(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT APFAEVOR FROM APFOLGE P "
                           + "  WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR: AND APFAFOLGE=:APFAFOLGE:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QAPF11(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT P.* "
                   + ",KSZLIEFNR,KSZLO,KSZLB,KSZLP,KSZMANUELKZ FROM APFOLGE P JOIN KSTAGZUO K ON P.APFKSTKRS=KSZKSTKRS AND APFKST=KSZKST AND APFAGANG=KSZAGANG "
                    + "  WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR=:APFALFDNR:"
                   + " ORDER BY P.APFMANDANT,P.APFANRKRS,P.APFALFDNR,P.APFAFOLGE";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public void DAPF01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE FROM APFOLGE   "
                + " WHERE  APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR =:APFALFDNR: AND APFAFOLGE=:APFAFOLGE: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void DAPF02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE FROM APFOLGE   WHERE  APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR =:APFALFDNR: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void DAPF03(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE FROM APFOLGE   WHERE APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void DAPF00(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE FROM APFOLGE   WHERE  APFMANDANT=:APFMANDANT: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }

        public void UpdateAPFOLGE(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {

            if (option == 0)
            {
                switch (app.company)
                { 
                    case "YGR":
                    case "SXN":
                    case "TST":
                    case "UBT":
                    default:
                        UAPF01(dwData);
                        break; 
                }
            } 
        }


        public void UAPF01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE APFOLGE SET APFMANDANT=:APFMANDANT:,APFWERK=:APFWERK:,APFANRKRS=:APFANRKRS:,APFALFDNR=:APFALFDNR:,APFAFOLGE=:APFAFOLGE:,APFAGANG=:APFAGANG:,APFBZAGANG=:APFBZAGANG:,APFKSTKRS=:APFKSTKRS:,APFKST=:APFKST:,APFSTDMASCH=:APFSTDMASCH:,APFMTYP=:APFMTYP:,APFPARALKZ=:APFPARALKZ:,APFBLOCKKZ1=:APFBLOCKKZ1:,APFBLOCKKZ2=:APFBLOCKKZ2:,APFSTATKZ=:APFSTATKZ:,APFPROZMG=:APFPROZMG:,APFKALKKZ=:APFKALKKZ:,APFDISPOST=:APFDISPOST:,APFARTKZ=:APFARTKZ:,APFARTAUSN=:APFARTAUSN:,APFZUSKZ=:APFZUSKZ:,APFZUSAUSN=:APFZUSAUSN:,APFRUECKKZ=:APFRUECKKZ:,APFKENNUNG=:APFKENNUNG:,APFLAGPLKZ=:APFLAGPLKZ:,APFMATABR=:APFMATABR:,APFSONDERKZ=:APFSONDERKZ:,APFZUSATZ1=:APFZUSATZ1:,APFZUSATZ2=:APFZUSATZ2:,APFZUSATZ3=:APFZUSATZ3:,APFZUSATZ4=:APFZUSATZ4:,APFZUSATZ5=:APFZUSATZ5:,APFZUSTAND=:APFZUSTAND:,APFDOMPART=:APFDOMPART:,APFFERTIG=:APFFERTIG:,APFPRUEFANW=:APFPRUEFANW:,APFPROBE=:APFPROBE:,APFPAPIERKZ=:APFPAPIERKZ:,APFEINSTKA=:APFEINSTKA:,APFLAEAEND=:APFLAEAEND:,APFLAEAENDO=:APFLAEAENDO:,APFGEWAEND=:APFGEWAEND:,APFMLMG=:APFMLMG:,APFBASMGE=:APFBASMGE:,APFME=:APFME:,APFZE=:APFZE:,APFZEITB=:APFZEITB:,APFPERSANZ=:APFPERSANZ:,APFQUALI=:APFQUALI:,APFLGRP=:APFLGRP:,APFLART=:APFLART:,APFLSCHEINE=:APFLSCHEINE:,APFLZDR=:APFLZDR:,APFVBKZ=:APFVBKZ:,APFZEITBT1=:APFZEITBT1:,APFZEITBT2=:APFZEITBT2:,APFZEITBT3=:APFZEITBT3:,APFZEITBT4=:APFZEITBT4:,APFZEITBT5=:APFZEITBT5:,APFZEITBT6=:APFZEITBT6:,APFZEITBT7=:APFZEITBT7:,APFZEITBT8=:APFZEITBT8:,APFZEITBT9=:APFZEITBT9:,APFZEITBT10=:APFZEITBT10:,APFZEITBT11=:APFZEITBT11:,APFZEITBT12=:APFZEITBT12:,APFZEITBT13=:APFZEITBT13:,APFZEITBT14=:APFZEITBT14:,APFZEITBT15=:APFZEITBT15:,APFZEITBT16=:APFZEITBT16:,APFZEITBT17=:APFZEITBT17:,APFZEITBT18=:APFZEITBT18:,APFZEITBT19=:APFZEITBT19:,APFZEITBT20=:APFZEITBT20:,APFZEITBT21=:APFZEITBT21:,APFZEITBT22=:APFZEITBT22:,APFZEITBT23=:APFZEITBT23:,APFZEITBT24=:APFZEITBT24:,APFZEITBT25=:APFZEITBT25:,APFZEITBT26=:APFZEITBT26:,APFZEITBT27=:APFZEITBT27:,APFZEITBT28=:APFZEITBT28:,APFZEITBT29=:APFZEITBT29:,APFZEITBT30=:APFZEITBT30:,APFZEITBT31=:APFZEITBT31:,APFZEITBT32=:APFZEITBT32:,APFZEITBT33=:APFZEITBT33:,APFZEITBT34=:APFZEITBT34:,APFZEITBT35=:APFZEITBT35:,APFZEITBT36=:APFZEITBT36:,APFZEITBT37=:APFZEITBT37:,APFZEITBT38=:APFZEITBT38:,APFZEITBT39=:APFZEITBT39:,APFZEITBT40=:APFZEITBT40:,APFZEITBT41=:APFZEITBT41:,APFZEITBT42=:APFZEITBT42:,APFZEITBT43=:APFZEITBT43:,APFZEITBT44=:APFZEITBT44:,APFZEITBT45=:APFZEITBT45:,APFZEITBT46=:APFZEITBT46:,APFZEITBT47=:APFZEITBT47:,APFZEITBT48=:APFZEITBT48:,APFAEVOR=:APFAEVOR:,APFBNRKRS=:APFBNRKRS:,APFBLFDNR=:APFBLFDNR:,APFBAFOLGE=:APFBAFOLGE:,APFKAFOLGE1=:APFKAFOLGE1:,APFKART1=:APFKART1:,APFKZMIN1=:APFKZMIN1:,APFKZMAX1=:APFKZMAX1:,APFKMINWMGE1=:APFKMINWMGE1:,APFKABST1=:APFKABST1:,APFKZE1=:APFKZE1:,APFKAFOLGE2=:APFKAFOLGE2:,APFKART2=:APFKART2:,APFKZMIN2=:APFKZMIN2:,APFKZMAX2=:APFKZMAX2:,APFKMINWMGE2=:APFKMINWMGE2:,APFKABST2=:APFKABST2:,APFKZE2=:APFKZE2:,APFKAFOLGE3=:APFKAFOLGE3:,APFKART3=:APFKART3:,APFKZMIN3=:APFKZMIN3:,APFKZMAX3=:APFKZMAX3:,APFKMINWMGE3=:APFKMINWMGE3:,APFKABST3=:APFKABST3:,APFKZE3=:APFKZE3:,APFKAFOLGE4=:APFKAFOLGE4:,APFKART4=:APFKART4:,APFKZMIN4=:APFKZMIN4:,APFKZMAX4=:APFKZMAX4:,APFKMINWMGE4=:APFKMINWMGE4:,APFKABST4=:APFKABST4:,APFKZE4=:APFKZE4:,APFKAFOLGE5=:APFKAFOLGE5:,APFKART5=:APFKART5:,APFKZMIN5=:APFKZMIN5:,APFKZMAX5=:APFKZMAX5:,APFKMINWMGE5=:APFKMINWMGE5:,APFKABST5=:APFKABST5:,APFKZE5=:APFKZE5:,APFVZUSA=:APFVZUSA:,APFVFDVF1=:APFVFDVF1:,APFVFDVF2=:APFVFDVF2:,APFVFDVF3=:APFVFDVF3:,APFVFDVF4=:APFVFDVF4:,APFVFDVF5=:APFVFDVF5:,APFNEGVERF=:APFNEGVERF:,APFRZUSA=:APFRZUSA:,APFRUESTGRP1=:APFRUESTGRP1:,APFRUESTGRP2=:APFRUESTGRP2:,APFRUESTGRP3=:APFRUESTGRP3:,APFRUESTGRP4=:APFRUESTGRP4:,APFRUESTGRP5=:APFRUESTGRP5:,APFNEGRGRP=:APFNEGRGRP:,APFPZUSA=:APFPZUSA:,APFPRUEFGRP1=:APFPRUEFGRP1:,APFPRUEFGRP2=:APFPRUEFGRP2:,APFPRUEFGRP3=:APFPRUEFGRP3:,APFPRUEFGRP4=:APFPRUEFGRP4:,APFPRUEFGRP5=:APFPRUEFGRP5:,APFNEGPGRP=:APFNEGPGRP:,APFQCCHECK=:APFQCCHECK:,APFOQUATF=:APFOQUATF:,APFOQUATUT=:APFOQUATUT:,APFOQUNIT=:APFOQUNIT:,APFTLVF1=:APFTLVF1:,APFTLVF2=:APFTLVF2:,APFTLVF3=:APFTLVF3:,APFTLVF4=:APFTLVF4:,APFTLVF5=:APFTLVF5:,APFNEGTLVF=:APFNEGTLVF:,APFIAUFMSL1=:APFIAUFMSL1:,APFIAUFMSL2=:APFIAUFMSL2:,APFIAUFMSL3=:APFIAUFMSL3:,APFIAUFMSL4=:APFIAUFMSL4:,APFIAUFMSL5=:APFIAUFMSL5:,APFIAUFMSL6=:APFIAUFMSL6:,APFNEGAUFM=:APFNEGAUFM:,APFOAUFMSL1=:APFOAUFMSL1:,APFOAUFMSL2=:APFOAUFMSL2:,APFOAUFMSL3=:APFOAUFMSL3:,APFOAUFMSL4=:APFOAUFMSL4:,APFOAUFMSL5=:APFOAUFMSL5:,APFOAUFMSL6=:APFOAUFMSL6:,APFONEGAUFM=:APFONEGAUFM:,APFZAM1=:APFZAM1:,APFZAM2=:APFZAM2:,APFZAM3=:APFZAM3:,APFZAM4=:APFZAM4:,APFZAM5=:APFZAM5:,APFNEGZAM=:APFNEGZAM:,APFVERP1=:APFVERP1:,APFVERP2=:APFVERP2:,APFVERP3=:APFVERP3:,APFVERP4=:APFVERP4:,APFVERP5=:APFVERP5:,APFNEGVERP=:APFNEGVERP:,APFSUBSTGR1=:APFSUBSTGR1:,APFSUBSTGR2=:APFSUBSTGR2:,APFSUBSTGR3=:APFSUBSTGR3:,APFSUBSTGR4=:APFSUBSTGR4:,APFSUBSTGR5=:APFSUBSTGR5:,APFNEGSUBST=:APFNEGSUBST:,APFWAART1=:APFWAART1:,APFWAART2=:APFWAART2:,APFWAART3=:APFWAART3:,APFWAART4=:APFWAART4:,APFWAART5=:APFWAART5:,APFNEGWAART=:APFNEGWAART:,APFBHDLG1=:APFBHDLG1:,APFBHDLG2=:APFBHDLG2:,APFBHDLG3=:APFBHDLG3:,APFBHDLG4=:APFBHDLG4:,APFBHDLG5=:APFBHDLG5:,APFBHDLG6=:APFBHDLG6:,APFNEGBHDLG=:APFNEGBHDLG:,APFBHDLG21=:APFBHDLG21:,APFBHDLG22=:APFBHDLG22:,APFBHDLG23=:APFBHDLG23:,APFBHDLG24=:APFBHDLG24:,APFBHDLG25=:APFBHDLG25:,APFBHDLG26=:APFBHDLG26:,APFNEGBHDLG2=:APFNEGBHDLG2:,APFBHDLG31=:APFBHDLG31:,APFBHDLG32=:APFBHDLG32:,APFBHDLG33=:APFBHDLG33:,APFBHDLG34=:APFBHDLG34:,APFBHDLG35=:APFBHDLG35:,APFBHDLG36=:APFBHDLG36:,APFNEGBHDLG3=:APFNEGBHDLG3:,APFBHDLG41=:APFBHDLG41:,APFBHDLG42=:APFBHDLG42:,APFBHDLG43=:APFBHDLG43:,APFBHDLG44=:APFBHDLG44:,APFBHDLG45=:APFBHDLG45:,APFBHDLG46=:APFBHDLG46:,APFNEGBHDLG4=:APFNEGBHDLG4:,APFFBKL1=:APFFBKL1:,APFFBKL2=:APFFBKL2:,APFFBKL3=:APFFBKL3:,APFFBKL4=:APFFBKL4:,APFFBKL5=:APFFBKL5:,APFFBKL6=:APFFBKL6:,APFNEGFBKL=:APFNEGFBKL:,APFMERK11=:APFMERK11:,APFMERK12=:APFMERK12:,APFMERK13=:APFMERK13:,APFMERK14=:APFMERK14:,APFMERK15=:APFMERK15:,APFMERK16=:APFMERK16:,APFNEGMERK1=:APFNEGMERK1:,APFHANDICAP1=:APFHANDICAP1:,APFHANDICAP2=:APFHANDICAP2:,APFHANDICAP3=:APFHANDICAP3:,APFHANDICAP4=:APFHANDICAP4:,APFHANDICAP5=:APFHANDICAP5:,APFHANDICAP6=:APFHANDICAP6:,APFNEGHANDICAP=:APFNEGHANDICAP:,APFGEWSCHL=:APFGEWSCHL:,APFGEW1=:APFGEW1:,APFGEW2=:APFGEW2:,APFNEGGEW=:APFNEGGEW:,APFBRTSCHL=:APFBRTSCHL:,APFBRT1=:APFBRT1:,APFBRT2=:APFBRT2:,APFNEGBRT=:APFNEGBRT:,APFWERT2SCHL=:APFWERT2SCHL:,APFWERT21=:APFWERT21:,APFWERT22=:APFWERT22:,APFNEGWERT2=:APFNEGWERT2:,APFMERK2=:APFMERK2:,APFMERKSCHL=:APFMERKSCHL:,APFNEGMERK2=:APFNEGMERK2:,APFANFART1=:APFANFART1:,APFANFWERT11=:APFANFWERT11:,APFANFWERT12=:APFANFWERT12:,APFANFART2=:APFANFART2:,APFANFWERT21=:APFANFWERT21:,APFANFWERT22=:APFANFWERT22:,APFUEBZT=:APFUEBZT:,APFAUSFA=:APFAUSFA:,APFAUSFB=:APFAUSFB:,APFAMETHODE=:APFAMETHODE:,APFAAFOLGE=:APFAAFOLGE:,APFVNAME=:APFVNAME:,APFFLAG=:APFFLAG:,APFTRKOST=:APFTRKOST:,APFSOKOST=:APFSOKOST:,APFSOME=:APFSOME:,APFZLKOST=:APFZLKOST:,APFURLAND=:APFURLAND:,APFAENDZL=:APFAENDZL:,APFAENDBEN=:APFAENDBEN:,APFAENDDAT=:APFAENDDAT:,APFNEUBEN=:APFNEUBEN:,APFNEUDAT=:APFNEUDAT:,APFFILLER=:APFFILLER:"
                 + " WHERE  APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR =:APFALFDNR: AND APFAFOLGE=:APFAFOLGE: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1); 
        }
        public void UAPF02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE APFOLGE SET APFAEVOR=:APFAEVOR:"
                 + " WHERE  APFMANDANT=:APFMANDANT: AND APFANRKRS=:APFANRKRS: AND APFALFDNR =:APFALFDNR: AND APFAFOLGE=:APFAFOLGE: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        
    }
}
